<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>View Item</title>
<style type="text/css">
table{
	border:1px solid;
	
	}
table th{
	border:1px solid;
	}
</style>
</head>

<body>
<?php
	$connection = mysql_connect('localhost', 'root', ''); 
	mysql_select_db('202_stock_db');

	$query = "SELECT * FROM items_tbl"; 
	$result = mysql_query($query);

	echo "<table cellpadding='2' cellspacing='2'><th>Porduct Name</th><th>Code</th><th>Price</th><th>Reorder Level</th><th>Description</th>"; 
	echo"<tr>";
	while($row = mysql_fetch_array($result)){ 
	echo "<td>" . $row['pname'] . "</td><td>" . $row['code'] . "</td><td>" . $row['price'] . "</td><td>" . $row['re_order_level'] . "</td><td>" . $row['description'] . "</td>";  
	echo"</tr>";
	}
	echo"</tr>";
	echo "</table>";

	mysql_close();
?>
</body>
</html>